package org.raymond.iworks.study.basic.designpattern.visitor.media3;

import java.util.List;

/**
 * @author raymond
 * @version V1.0
 * @Description: TODO
 */
public class App {
    public static void main(String[] args) {
        List<MediaFile> mediaFileList = List.of(
                new Picture("a.jpg"),
                new Picture("b.jpg"),
                new Gif("c.gif"),
                new Video("d.mp4"),
                new Video("e.avi")
        );
        Extractor extractor = new Extractor();
        for(MediaFile media : mediaFileList){
            media.accept(extractor);
        }
        Watermarker watermarker = new Watermarker();
        for(MediaFile media : mediaFileList){
            media.accept(watermarker);
        }
    }
}
